package cn.congzhou.crm.domain;

import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class School {
    private Long id;

    private String name;

    private String schoolCode;

    private String address;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date openDate;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date closeDate;

    private Integer status;


    public String getStatusName(){
        if (status == null){
            return "";
        }else if(status == 0){
            return "待开业";
        }else if(status == 1){
            return "正常营业";
        }else {
            //status == 2
            return "已关闭";
        }
    }


}